package com.client.base.log.Impl;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class LogerImpl implements Loger {
	
	private Log log = null;
	
	@SuppressWarnings("rawtypes")
	public LogerImpl( Class clazz ){
		log = LogFactory.getLog(clazz);
	}
	

	@Override
	public void info(Object logMsg) {
		if(log.isInfoEnabled()) log.info(logMsg);
	}

	@Override
	public void debug(Object logMsg) {
		if(log.isDebugEnabled()) log.debug(logMsg);
	}

	@Override
	public void error(Object logMsg) {
		if(log.isErrorEnabled()) log.error(logMsg);
	}

	@Override
	public void warn(Object logMsg) {
		if(log.isWarnEnabled()) log.warn(logMsg);
	}

	@Override
	public void fatal(Object logMsg) {
		if(log.isFatalEnabled()) log.fatal(logMsg);
	}


	@Override
	public void info(Object logMsg, Throwable throwable) {
		if(log.isInfoEnabled()) log.info(logMsg, throwable);
	}


	@Override
	public void debug(Object logMsg, Throwable throwable) {
		if(log.isDebugEnabled()) log.debug(logMsg, throwable);
	}


	@Override
	public void error(Object logMsg, Throwable throwable) {
		if(log.isErrorEnabled()) log.error(logMsg, throwable);
	}


	@Override
	public void warn(Object logMsg, Throwable throwable) {
		if(log.isWarnEnabled()) log.warn(logMsg, throwable);
	}


	@Override
	public void fatal(Object logMsg, Throwable throwable) {
		if(log.isFatalEnabled()) log.fatal(logMsg, throwable);
	}

}
